<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>MyISERN 1.3 - Display</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript" src="ajax/prototype.js"></script>
<script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
<link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!-- start header -->
<div id="header">
    <div id="logo">
        <h1><a href="home.jsp">MyISERN 1.3</a></h1>
    </div>
    <div id="menu">
        <ul>
            <li><a href="home.jsp">Homepage</a></li>
            <li class="current_page_item"><a href="display.jsp">Display</a></li>
            <li><a href="add.jsp">Add</a></li>
            <li><a href="edit.jsp">Edit</a></li>
			<li><a href="sanityCheck.jsp">Report</a></li>
            <li><stripes:link href="Logout.action" event="logout" >Logout</stripes:link></li>
        </ul>
    </div>
</div>
<!-- end header -->
<!-- start page -->
<div id="page">
    <!-- start leftbar -->
    <div id="leftbar" class="sidebar">
        <ul>
            <li>
                <h2>Display</h2>
                <ul>
                    <li>
                        <stripes:form id="ResearcherForm" action="/MyIsern.action">
                          <stripes:submit value="Researchers" name="displayResearchers"/>
                        </stripes:form>
                    </li>
                    <li>
                        <stripes:form id="OrganizationForm" action="/MyIsern.action">
                          <stripes:submit value="Organizations" name="displayOrganizations"/>
                        </stripes:form>
                    </li>
                    <li>
                        <stripes:form id="CollaborationForm" action="/MyIsern.action">
                          <stripes:submit value="Collaborations" name="displayCollaborations"/>
                        </stripes:form>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
    <!-- end leftbar -->
    <!-- start content -->
    <div id="content">
        <div class="post">
            <h1 class="title" align="center">Display ${actionBean.listType}</h1>
			<table>
				<tbody>
					<tr>
						<td align="center"><strong><font color="white">${actionBean.errorMessage}</font></strong></td>
					</tr>
				</tbody>
			</table>
	            <div class="entry">
				<c:if test='${actionBean.listType == "Researchers"}'>
					<c:forEach var="element" items="${actionBean.researchers}">
						<div id="CollapsiblePanel1" class="CollapsiblePanel">
							<div class="CollapsiblePanelTab" tabindex="0">${element.name}</div>
							<div class="CollapsiblePanelContent">
								<table cellpadding="5" border="1">
									<tbody>
										<tr align="left">
											<td><strong>Organization</strong></td>
											<td>
												<table><tbody><tr><td>${element.organization}</td></tr></tbody></table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Email</strong></td>
											<td>
												<table><tbody><tr><td>${element.email}</td></tr></tbody></table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Picture-Link</strong></td>
											<td>
												<table><tbody><tr><td>${element.pictureLink}</td></tr></tbody></table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Bio-Statement</strong></td>
											<td>
												<table><tbody><tr><td>${element.bioStatement}</td></tr></tbody></table>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<script type="text/javascript">
							var acc1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", { contentIsOpen: false });
						</script> 
					</c:forEach>
                </c:if>
				<c:if test='${actionBean.listType == "Organizations"}'>
					<c:forEach var="element" items="${actionBean.organizations}">
						<hr />
						<div id="CollapsiblePanel1" class="CollapsiblePanel">
							<div class="CollapsiblePanelTab" tabindex="0">${element.name}</div>
							<div class="CollapsiblePanelContent">
								<table cellpadding="5" border="1">
									<tbody>
										<tr align="left">
											<td><strong>Type</strong></td>
											<td>
												<table><tbody><tr><td>${element.type}</td></tr></tbody></table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Contact</strong></td>
											<td>
												<table><tbody><tr><td>${element.contact}</td></tr></tbody></table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Affiliated-Researchers</strong></td>
											<td>
												<table>
													<tbody>
														<c:forEach var="element1" items="${element.affiliatedResearchers.affiliatedResearcher}">
															<tr align="left">	
																<td>${element1}</td>
															</tr>
														</c:forEach>
													</tbody>
												</table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Country</strong></td>
											<td>
												<table><tbody><tr><td>${element.country}</td></tr></tbody></table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Research-Keywords</strong></td>
											<td>
												<table>
													<tbody>
														<c:forEach var="element2" items="${element.researchKeywords.researchKeyword}">
															<tr align="left">
																<td>${element2}</td>
															</tr>
														</c:forEach>
													</tbody>
												</table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Research-Description</strong></td>
											<td>
												<table><tbody><tr><td>${element.researchDescription}</td></tr></tbody></table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Home Page</strong></td>
											<td>
												<table><tbody><tr><td>${element.homePage}</td></tr></tbody></table>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<hr />
						<script type="text/javascript">
								var acc1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", { contentIsOpen: false });
						</script> 
					</c:forEach>
                </c:if>
				<c:if test='${actionBean.listType == "Collaborations"}'>
                    <c:forEach var="element" items="${actionBean.collaborations}">
						<div id="CollapsiblePanel1" class="CollapsiblePanel">
							<div class="CollapsiblePanelTab" tabindex="0">${element.name}</div>
							<div class="CollapsiblePanelContent">
								<table cellpadding="5" border="1">
									<tbody>
										<tr align="left">
											<td><strong>Collaborating-Organizations</strong></td>
											<td>
												<table>
													<tbody>
														<c:forEach var="element1" items="${element.collaboratingOrganizations.collaboratingOrganization}">
															<tr align="left">
																<td>${element1}</td>
															</tr>
														</c:forEach>
													</tbody>
												</table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Collaboration-Types</strong></td>
											<td>
												<table>
													<tbody>
														<c:forEach var="element2" items="${element.collaborationTypes.collaborationType}">
															<tr align="left">
																<td>${element2}</td>
															</tr>
														</c:forEach>
													</tbody>
												</table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Years</strong></td>
											<td>
												<table>
													<tbody>
														<c:forEach var="element3" items="${element.years.year}">
															<tr align="left">
																<td>${element3}</td>
															</tr>
														</c:forEach>
													</tbody>
												</table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Outcome-Types</strong></td>
											<td>
												<table>
													<tbody>
														<c:forEach var="element4" items="${element.outcomeTypes.outcomeType}">
															<tr align="left">
																<td>${element4}</td>
															</tr>
														</c:forEach>
													</tbody>
												</table>
											</td>
										</tr>
										<tr align="left">
											<td><strong>Description</strong></td>
											<td>
												<table><tbody><tr><td>${element.description}</td></tr></tbody></table>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>
						<script type="text/javascript">
							var acc1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", { contentIsOpen: false });
						</script> 
				    </c:forEach>
                </c:if>
            </div>
            <p class="links"><a href="http://isern.iese.de/network/ISERN/pub/isern.mail.html" class="comments">Contact Us</a></p>
        </div>
    </div>
    <!-- end content -->
    <div style="clear: both;">&nbsp;</div>
</div>
<!-- end page -->
<hr />
<div id="footer">
    <p>&copy;2007 All Rights Reserved.</p>
</div>
</body>
</html>
